#include "functions.h"
#include <cmath>
double MaxCp(double Mach)
{
    double gamma{1.4};
    double tmp = (gamma + 1.0) * (gamma + 1.0) * Mach * Mach;
    tmp /= (4 * gamma * Mach * Mach - 2.0*(gamma -1));
    tmp = pow(tmp, gamma/(gamma -1.0));
    tmp *= ((1.0-gamma + 2.0*gamma*Mach*Mach)/(gamma+1.0));
    tmp -= 1.0;
    return 2.0/(gamma * Mach * Mach) * tmp;
}